package com.education.basic.resource;

import java.util.Arrays;
import java.util.List;

/**
 * 职称
 * @author 云上蜗牛
 */
public enum Title 
{
	ZJ("01","助教"),JS("02","讲师"),F_JS("03","副教授"),J_S("04","教授");
	
	private String titleCode;
	private String titleName;
	
	Title(String titleCode,String titleName)
	{
		this.titleCode = titleCode;
		this.titleName =titleName;
	}

	public String getTitleCode()
	{
		return titleCode;
	}

	public void setTitleCode(String titleCode)
	{
		this.titleCode = titleCode;
	}

	public String getTitleName()
	{
		return titleName;
	}

	public void setTitleName(String titleName)
	{
		this.titleName = titleName;
	}

	/**
	 * 返回职称
	 * @return
	 */
	public static List<Title> getTitles()
	{
		return Arrays.asList(Title.values());
	}
	
	/**
	 * 比较职称的高低
	 * @param title
	 * @return
	 */
	public  boolean highTo(Title title)
	{
		return (int)Integer.parseInt(this.getTitleCode())> (int)Integer.parseInt(title.getTitleCode());
	}
}
